package com.scs.application.enums;

import lombok.Getter;

/**
 * @description: 耗材询价单状态
 */
@Getter
public enum MaterialInquiryStatus {
    PUBLISHED("published","已发布"),
    FINISHED("finished","询价结束"),
    CANCELED("canceled","已取消");

    private String value;

    private String name;

    MaterialInquiryStatus(String value, String name) {
        this.value = value;
        this.name = name;
    }

    public static MaterialInquiryStatus of(String value) {
        switch (value){
            case "published":
                return MaterialInquiryStatus.PUBLISHED;
            case "finished":
                return MaterialInquiryStatus.FINISHED;
            case "canceled":
                return MaterialInquiryStatus.CANCELED;
            default:
                return MaterialInquiryStatus.PUBLISHED;
        }
    }


}

